import $http from './http';
import qs from 'qs';
//获取智能纠错信息
export function getErrorMsg(data) {
  return $http({
    url: `/aiedoc/correct.do?method=aiCorrect`,
    method: 'post',
    data:qs.stringify(data),
    contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
  });
}
export function downloadReport(data) {
  return $http({
    url: `/aiedoc/correct.do?method=genErrorReport`,
    method: 'post',
    data:qs.stringify(data),
    contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
  });
}
//模板保存到知识库
export function saveMainBody(data) {
  return $http({
    url: `/doc.do?method=docUpload&from=doclndex&type=1`,
    method: 'post',
    data:qs.stringify(data),
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
  });
}

export function createFlowChart(data) {
  return $http({
    url: `/rest/graph/create`,
    method: 'post',
    data:data,
  });
}
